Introduction To The ClientProtector Component

Developing Applications Using The SoftwareShield System > Introduction to the SoftwareShield System > Introduction To The ClientProtector Component

## Introduction To The ClientProtector Component

This section is an introduction to the SoftwareShield ClientProtector COM component. For comprehensive help on the ClientProtector COM component, and all its functions, you should instead see the SoftwareShield ClientProtector COM Component. The terms ClientProtector and SSCProtector refer to the same object, but the latter is the programmatic name for the component.

The SoftwareShield ClientProtector is a dll that comes with all versions of the SoftwareShield System (SSCProt.dll). The dll exposes an interface to a COM object (SSCProtector) which has only one available interface (ISSCProtector). COM objects can be created and accessed in any environment that supports COM. This is virtually every Windows development IDE in widespread use. Use the ClientProtector COM component from environments like Visual Basic, MSVisual C++, MS.NET, Borland Delphi, Borland C++ Builder, and many others even script languages like VBScript and JScript.

Never used a COM component in your applications before? Don't worry - SoftwareShield has provided you with example programs as well as sample code for several environments that make it easy. See Example Licenses And Programs as well as Linking to ClientProtector In Your Application. The SoftwareShield License Manager even writes some sample code for you when you compile a license project.

The SoftwareShield ClientProtector Component (SSCProt.dll) must be distributed with your applications that use the SoftwareShield System. The dll (actually a COM server) must also be registered on the users system when you install your application. Registration of server dlls is almost always handled by the installer program (check your installer creation program to see how to register dlls on the users system), however (as always) you can manually register them using the Windows utility "regsvr32.exe".

For development purposes we also provide a debug version of the ClientProtector component. It is located in SSCProtD.dll. The component name and interface is identical. Your code to use the debug version can also be made to be identical for ease of development. This allows you to invoke the debug or the release versions just by re-registering the correct server on your development machine. The debug version can be configured to output various "levels" of information in up to three different formats simultaneously. For more information see: Testing and Debugging Support and Controlling Debug Output in the Feature Guide.

The SoftwareShield ClientProtector component interacts with the distributed license you also ship with your programs and enforces the details of your license. Your program invokes the component to perform certain actions at run-time and responds accordingly to any return values. The COM component in some circumstances may need you to query your user for information so that it can process requests or validate authenticity. This is accomplished by means of COM event support.

Once setup correctly, the user can purchase your product on the spot - receiving an activation code once their payment has been processed by your web-site (or third party merchant) and input the code to their copy of your application, without even shutting it down and activating it within minutes.

When you integrate the component into your application there are few steps you must take. These steps are explained in much more detail in the sections: SoftwareShield ClientProtector COM Component. First, on startup of your application you must create an instance of the object through its COM interface. Depending on your development environment and how you import the component, this creation step may be handled by the IDE for you. Then, immediately call the "StartUp" function of the object with the appropriate parameters. This call initializes the component returning a value that indicates how the startup procedure went. Your program can then take action depending on those values. After the startup call (regardless of its returned values) you may make further calls on the component for further functionality (if needed). StartUp only needs to be called once. Returned parameter values from all function calls to the ClientProtector component allow your application to interact with the component in a meaningful way. Depending on the returned parameter values from the various function calls, your application can take appropriate action; interacting with the user, allowing/disallowing execution, running in demo mode, shutting down, or any number of other possibilities.